package com.ruoyi.grape.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.grape.mapper.GrapeDeviceMapper;
import com.ruoyi.grape.domain.GrapeDevice;
import com.ruoyi.grape.service.IGrapeDeviceService;

/**
 * 设备管理Service业务层处理
 * 
 * @author ld
 * @date 2023-11-18
 */
@Service
public class GrapeDeviceServiceImpl implements IGrapeDeviceService 
{
    @Autowired
    private GrapeDeviceMapper grapeDeviceMapper;

    /**
     * 查询设备管理
     * 
     * @param deviceId 设备管理主键
     * @return 设备管理
     */
    @Override
    public GrapeDevice selectGrapeDeviceByDeviceId(Long deviceId)
    {
        return grapeDeviceMapper.selectGrapeDeviceByDeviceId(deviceId);
    }

    /**
     * 查询设备管理列表
     * 
     * @param grapeDevice 设备管理
     * @return 设备管理
     */
    @Override
    public List<GrapeDevice> selectGrapeDeviceList(GrapeDevice grapeDevice)
    {
        return grapeDeviceMapper.selectGrapeDeviceList(grapeDevice);
    }

    /**
     * 新增设备管理
     * 
     * @param grapeDevice 设备管理
     * @return 结果
     */
    @Override
    public int insertGrapeDevice(GrapeDevice grapeDevice)
    {
        return grapeDeviceMapper.insertGrapeDevice(grapeDevice);
    }

    /**
     * 修改设备管理
     * 
     * @param grapeDevice 设备管理
     * @return 结果
     */
    @Override
    public int updateGrapeDevice(GrapeDevice grapeDevice)
    {
        return grapeDeviceMapper.updateGrapeDevice(grapeDevice);
    }

    /**
     * 批量删除设备管理
     * 
     * @param deviceIds 需要删除的设备管理主键
     * @return 结果
     */
    @Override
    public int deleteGrapeDeviceByDeviceIds(Long[] deviceIds)
    {
        return grapeDeviceMapper.deleteGrapeDeviceByDeviceIds(deviceIds);
    }

    /**
     * 删除设备管理信息
     * 
     * @param deviceId 设备管理主键
     * @return 结果
     */
    @Override
    public int deleteGrapeDeviceByDeviceId(Long deviceId)
    {
        return grapeDeviceMapper.deleteGrapeDeviceByDeviceId(deviceId);
    }
}
